package com.yl.module.property.domain.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.yl.common.core.validate.Group;
import com.yl.common.domain.base.dto.PageDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 资产添加或修改DTO
 * @author makejava
 * @date 2024-10-23 15:54:15
 */
@Data
@ApiModel(value = "PropertyAddOrUpdDTO", description = "资产添加或修改DTO")
public class PropertyAddOrUpdDTO implements Serializable {
	private static final long serialVersionUID = -58694481108239716L;

    @ApiModelProperty(value = "资产表-主键id")
	@NotNull(message = "参数id 不能为空", groups = {Group.Upd.class })
	@Min(value = 1, message = "参数id 不能为空", groups = {Group.Upd.class })
    private Integer id;

	@ApiModelProperty(value = "资产一级分类id 1家电 2安消 3家具 4构件")
	@NotNull(message = "参数propertyTypeId 不能为空", groups = { Group.Add.class, Group.Upd.class })
	@Min(value = 1, message = "参数propertyTypeId 不能为空", groups = { Group.Add.class, Group.Upd.class })
	private Integer propertyTypeId;

	@ApiModelProperty(value = "资产二级分类id")
	@NotNull(message = "参数propertyTypeId2 不能为空", groups = { Group.Add.class, Group.Upd.class })
	@Min(value = 1, message = "参数propertyTypeId2 不能为空", groups = { Group.Add.class, Group.Upd.class })
    private Integer propertyTypeId2;

	@ApiModelProperty(value = "资产三级分类id 如果是构件 此字段必传")
	private Integer propertyTypeId3;

	@ApiModelProperty(value = "资产名称")
	@NotBlank(message = "参数name 不能为空", groups = { Group.Add.class, Group.Upd.class })
    private String name;

	@ApiModelProperty(value = "资产品牌")
    private String brand;

	@ApiModelProperty(value = "bim编码")
	private String bimCode;

	@ApiModelProperty(value = "安装日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime installDate;

	@ApiModelProperty(value = "是否开启保养提醒 0否 1是 默认0")
    private Integer isMaintain;

	@ApiModelProperty(value = "保养周期(月)")
    private Integer maintainPeriod;

	@ApiModelProperty(value = "下次保养日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime nextTimeMaintain;

	@ApiModelProperty(value = "是否开启更换提醒 0否 1是 默认0")
	private Integer isChange;

	@ApiModelProperty(value = "下次更换日期")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime latelyChangeDate;

	@ApiModelProperty(value = "资产封面图片 文件id")
	private List<Long> fileCoverIds;



}

